/*
 * Person.java
 * Team qq 2011
 */
package com.google.code.timetrail.backend;

public class Person {

	protected int illness, death, health;

	protected String name;
	
	/** Standard starting money except for Entrepreneurs and Nutritionists*/
	private static final int START_MONEY = 800; 

	private final int START_FCELL = 0;

	private final int START_FOOD = 0;

	private final int START_HULLP = 0;

	private final int START_FCAP = 0;

	private final int START_ILL = 5;

	private final int START_DEATH = 5;

	private final int START_HEALTH = 95;
	
	public Person() {
		illness = START_ILL;
		death = START_DEATH;
		health = START_HEALTH;
	}
	
	public Person(String name){
		this();
		this.name = name;
	}

	/**
	 * Adds an initial bonus to the inventory, typically depending on what subclass of person 
	 * is recognized 
	 * @param inv the inventory that will receive the bonus
	 */
	public void initialBonus(Inventory inv){
		inv.addItem(START_MONEY, inv.getMoney());
		inv.addItem(START_FOOD, inv.getFood());
		inv.addItem(START_FCELL, inv.getFuelCells());
		inv.addItem(START_HULLP, inv.getHullParts());
		inv.addItem(START_FCAP, inv.getHullParts());
	}
	
	public boolean isAlive() {
		return health > 0;
	}

	public int getIllness() {
		return illness;
	}

	public void setIllness(int illness) {
		this.illness = illness;
	}

	public int getDeath() {
		return death;
	}

	public void setDeath(int death) {
		this.death = death;
	}

	public int getHealth() {
		return health;
	}

	public void setHealth(int health) {
		this.health = health;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}
}
